package com.ylink.mqtt.test;

import java.io.IOException;

import org.junit.Test;

public class PahoMqttClientReceive {
	private final String MQTT_HOST = "m2m.eclipse.org"; // "tcp://197.3.11.16";

	@Test
	public void test() {
		PahoMqttClient client = new PahoMqttClient();
		client.setHost(MQTT_HOST);
		client.setPort(1883);
		client.setClientId("TestCase1");

		client.connect(null, null, 30 * 1000, null, false, null);
		client.subscribe("yxbank/mmp/procpush/clientId/99376D81-C865-4DC9-9113-9788D55ADB4C", 2);

		try {
			System.in.read();
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

}
